<template>
	<view class="pageItem">
		<view class="title">{{title}}</view>
		<view class="content">
			 <u-parse :lazyLoad="true" :content="content" :selectable="true" ></u-parse>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id : 0,
				show: false,
				title : '',
				time : '',
				ori : '',
				content : '',
				titleStyle:{
					  fontWeight: 'bold',
				},
				placeholderStyle:{
					textAlign : 'center',
				}
			};
		},
		onLoad(opt) {
			this.id = opt.id || 0;
			if(opt.ori){
				this.ori = opt.ori;
			}
			this.initData();
		},
		methods:{
			initData(){
				let url = this.site_url + 'api/index/art_detail?article_id='+this.id;
				let param = {ori : this.ori};
				this.areq(url,param,'POST').then(res=>{
					 if(res.code == 1){		 
						 let ret = res.data;
						 this.title = ret.title;
						 this.time = ret.publish_time;
						 this.content = ret.content;
					 }
					
				})
			},
			close(){
				this.show = false;
			},
			
		}
		
	}
</script>

<style lang="scss">
.title{
	width: 92%;
	margin-left: 4%;
	padding: 2vw 0 4vw;
	font-size: 5vw;
	font-weight: bold;
	color: #f9f9f9;
	text-align: center;
	border-bottom: 1rpx solid #dedede;
	letter-spacing: 5rpx;
}
.content{
	width: 100%;
	padding: 4vw 3% 2vw;
	color: #f9f9f9;
}
</style>
